'\" te
.\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 1989 AT&T
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
.\"  See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with
.\" the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MOUNT_UFS 8 "Jun 22, 2009"
.SH NAME
mount_ufs \- mount ufs file systems
.SH SYNOPSIS
.LP
.nf
\fBmount\fR \fB-F\fR ufs [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
     [\fB-O\fR] \fIspecial\fR | \fImount_point\fR
.fi

.LP
.nf
\fBmount\fR \fB-F\fR ufs [\fIgeneric_options\fR] [\fB-o\fR \fIspecific_options\fR]
     [\fB-O\fR] \fIspecial\fR \fImount_point\fR
.fi

.SH DESCRIPTION
.sp
.LP
The \fBmount\fR utility attaches a \fBufs\fR file system to the file system
hierarchy at the \fImount_point\fR, which is the pathname of a directory. If
\fImount_point\fR has any contents prior to the \fBmount\fR operation, these
are hidden until the file system is unmounted.
.sp
.LP
The \fBufs\fR file system supports direct mounting of files containing the file
system as well as block devices. See \fBmount\fR(8) and \fBlofiadm\fR(8).
.sp
.LP
If \fBmount\fR is invoked with \fIspecial\fR or \fImount_point\fR as the only
arguments, \fBmount\fR will search \fB/etc/vfstab\fR to fill in the missing
arguments, including the \fIspecific_options\fR. See \fBmount\fR(8).
.sp
.LP
If \fIspecial\fR and \fImount_point\fR are specified without any
\fIspecific_options\fR, the default is \fBrw\fR.
.sp
.LP
If the directory on which a file system is to be mounted is a symbolic link,
the file system is mounted on the directory to which the symbolic link refers,
rather than on top of the symbolic link itself.
.SH OPTIONS
.sp
.LP
See \fBmount\fR(8) for the list of supported \fIgeneric_options\fR.
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-o\fR \fIspecific_options\fR\fR
.ad
.sp .6
.RS 4n
Specify \fBufs\fR file system specific options in a comma-separated list with
no intervening spaces. If invalid options are specified, a warning message is
printed and the invalid options are ignored. The following options are
available:
.sp
.ne 2
.na
\fB\fBdfratime\fR | \fBnodfratime\fR\fR
.ad
.sp .6
.RS 4n
By default, writing access time updates to the disk may be deferred
(\fBdfratime\fR) for the file system until the disk is accessed for a reason
other than updating access times. \fBnodfratime\fR disables this behavior.
.sp
If power management is enabled on the system, do not set \fBnodfratime\fR
unless \fBnoatime\fR is also set. If you set \fBnodfratime\fR without setting
\fBnoatime\fR, the disk is spun up every time a file within a file system on
the disk is accessed - even if the file is not modified.
.RE

.sp
.ne 2
.na
\fB\fBforcedirectio\fR | \fBnoforcedirectio\fR\fR
.ad
.sp .6
.RS 4n
If \fBforcedirectio\fR is specified and supported by the file system, then for
the duration of the mount, forced direct \fBI/O\fR will be used. If the
filesystem is mounted using \fBforcedirectio\fR, data is transferred directly
between user address space and the disk. If the filesystem is mounted using
\fBnoforcedirectio\fR, data is buffered in kernel address space when data is
transferred between user address space and the disk. \fBforcedirectio\fR is a
performance option that is of benefit only in large sequential data transfers.
The default behavior is \fBnoforcedirectio\fR.
.RE

.sp
.ne 2
.na
\fB\fBglobal\fR | \fBnoglobal\fR\fR
.ad
.sp .6
.RS 4n
If \fBglobal\fR is specified and supported on the file system, and the system
in question is part of a cluster, the file system will be globally visible on
all nodes of the cluster. If \fBnoglobal\fR is specified, the mount will not be
globally visible. The default behavior is \fBnoglobal\fR.
.RE

.sp
.ne 2
.na
\fB\fBintr\fR | \fBnointr\fR\fR
.ad
.sp .6
.RS 4n
Allow (do not allow) keyboard interrupts to kill a process that is waiting for
an operation on a locked file system. The default is \fBintr\fR.
.RE

.sp
.ne 2
.na
\fB\fBlargefiles\fR | \fBnolargefiles\fR\fR
.ad
.sp .6
.RS 4n
If \fBnolargefiles\fR is specified and supported by the file system, then for
the duration of the mount it is guaranteed that all regular files in the file
system have a size that will fit in the smallest object of type \fBoff_t\fR
supported by the system performing the mount. The mount will fail if there are
any files in the file system not meeting this criterion. If \fBlargefiles\fR is
specified, there is no such guarantee. The default behavior is
\fBlargefiles\fR.
.sp
If \fBnolargefiles\fR is specified, \fBmount\fR will fail for \fBufs\fR if the
file system to be mounted has contained a large file (a file whose size is
greater than or equal to 2 Gbyte) since the last invocation of \fBfsck\fR on
the file system. The large file need not be present in the file system at the
time of the mount for the mount to fail; it could have been created previously
and destroyed. Invoking \fBfsck\fR (see \fBfsck_ufs\fR(8)) on the file system
will reset the file system state if no large files are present. After invoking
\fBfsck\fR, a successful mount of the file system with \fBnolargefiles\fR
specified indicates the absence of large files in the file system; an
unsuccessful mount attempt indicates the presence of at least one large file.
.RE

.sp
.ne 2
.na
\fB\fBlogging\fR | \fBnologging\fR\fR
.ad
.sp .6
.RS 4n
If \fBlogging\fR is specified, then logging is enabled for the duration of the
mounted file system. Logging is the process of storing transactions (changes
that make up a complete \fBUFS\fR operation) in a log before the transactions
are applied to the file system. Once a transaction is stored, the transaction
can be applied to the file system later.  This prevents file systems from
becoming inconsistent, therefore reducing  the possibility that \fBfsck\fR
might run. And, if \fBfsck\fR is bypassed, logging generally reduces  the time
required to reboot a system.
.sp
The default behavior is \fBlogging\fR for all UFS file systems.
.sp
The log is allocated from free blocks in the file system, and is sized
approximately 1 Mbyte per 1 Gbyte of file system, up to a maximum of 256
Mbytes. The log size may be larger (up to a maximum of 512 Mbytes) dependent
upon the  number of cylinder groups present in the file system.
.sp
Logging is enabled on any \fBUFS\fR file system, including root (\fB/\fR),
except under the following conditions:
.RS +4
.TP
.ie t \(bu
.el o
When logging is specifically disabled.
.RE
.RS +4
.TP
.ie t \(bu
.el o
If there is insufficient file system space for the log. In this case, the
following message is displayed and file system is still mounted:
.sp
.in +2
.nf
# mount /dev/dsk/c0t4d0s0 /mnt
  /mnt: No space left on device
  Could not enable logging for /mnt on  /dev/dsk/c0t4d0s0.
.fi
.in -2
.sp

.RE
The log created by \fBUFS\fR logging is continually flushed as it fills up. The
log is totally flushed when the file system is unmounted or as a result of the
\fBlockfs -f\fR command.
.RE

.sp
.ne 2
.na
\fB\fBm\fR\fR
.ad
.sp .6
.RS 4n
Mount the file system without making an entry in \fB/etc/mnttab\fR.
.RE

.sp
.ne 2
.na
\fB\fBnoatime\fR\fR
.ad
.sp .6
.RS 4n
By default, the file system is mounted with normal access time (\fBatime\fR)
recording. If \fBnoatime\fR is specified, the file system will ignore access
time updates on files, except when they coincide with updates to the
\fBctime\fR or \fBmtime\fR. See \fBstat\fR(2). This option reduces disk
activity on file systems where access times are unimportant (for example, a
Usenet news spool).
.sp
\fBnoatime\fR turns off access time recording regardless of \fBdfratime\fR or
\fBnodfratime\fR.
.sp
The POSIX standard requires that access times be marked on files.
\fB-noatime\fR ignores them unless the file is also modified.
.RE

.sp
.ne 2
.na
\fB\fBnosec\fR\fR
.ad
.sp .6
.RS 4n
By default, Access Control Lists (ACLs) are supported on a mounted UFS file
system. Use this option to disallow the setting or any modification of an ACL
on a file within a mounted UFS file system. See \fBgetfacl\fR(1) for background
on ACLs.
.RE

.sp
.ne 2
.na
\fB\fBonerror\fR = \fIaction\fR\fR
.ad
.sp .6
.RS 4n
This option specifies the action that \fBUFS\fR should take to recover from an
internal inconsistency on a file system. Specify \fIaction\fR as \fBpanic\fR,
\fBlock\fR, or \fBumount\fR. These values cause a forced system shutdown, a
file system lock to be applied to the file system, or the file system to be
forcibly unmounted, respectively. The default is \fBpanic\fR.
.RE

.sp
.ne 2
.na
\fB\fBquota\fR\fR
.ad
.sp .6
.RS 4n
Quotas are turned on for the file system.
.RE

.sp
.ne 2
.na
\fB\fBremount\fR\fR
.ad
.sp .6
.RS 4n
Remounts a file system with a new set of options. All options not explicitly
set with \fBremount\fR revert to their default values.
.RE

.sp
.ne 2
.na
\fB\fBrq\fR\fR
.ad
.sp .6
.RS 4n
Read-write with quotas turned on. Equivalent to \fBrw, quota\fR.
.RE

.RE

.sp
.ne 2
.na
\fB\fBxattr\fR | \fBnoxattr\fR\fR
.ad
.sp .6
.RS 4n
Allow or disallow the creation and manipulation of extended attributes. The
default is \fBxattr\fR. See \fBfsattr\fR(7) for a description of extended
attributes.
.RE

.sp
.ne 2
.na
\fB\fB-O\fR\fR
.ad
.sp .6
.RS 4n
Overlay mount. Allow the file system to be mounted over an existing mount
point, making the underlying file system inaccessible. If a mount is attempted
on a pre-existing mount point without setting this flag, the mount will fail,
producing the error "device busy".
.RE

.SH EXAMPLES
.LP
\fBExample 1 \fRTurning Off (and On) Logging
.sp
.LP
The following command turns off logging on an already mounted file system. The
subsequent command restores logging.

.sp
.in +2
.nf
# mount -F ufs -o remount,nologging /export
# \fB(absence of message indicates success)\fR
# mount -F ufs -o remount,logging /export
.fi
.in -2

.sp
.LP
In the preceding commands, the \fB-F\fR \fBufs\fR option is not necessary.

.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/mnttab\fR\fR
.ad
.sp .6
.RS 4n
table of mounted file systems
.RE

.sp
.ne 2
.na
\fB\fB/etc/vfstab\fR\fR
.ad
.sp .6
.RS 4n
list of default parameters for each file system
.RE

.SH SEE ALSO
.sp
.LP
.BR getfacl (1),
.BR fcntl (2),
.BR mount (2),
.BR stat (2),
.BR mnttab (5),
.BR vfstab (5),
.BR attributes (7),
.BR fsattr (7),
.BR largefile (7),
.BR fsck (8),
.BR fsck_ufs (8),
.BR lofiadm (8),
.BR mount (8),
.BR mountall (8)
.SH NOTES
.sp
.LP
Since the root (\fB/\fR) file system is mounted read-only by the kernel during
the boot process, only the \fBremount\fR option (and options that can be used
in conjunction with \fBremount\fR) affect the root (\fB/\fR) entry in the
\fB/etc/vfstab\fR file.
